﻿@model IList<ProductOverviewModel>


@using Nop.Web.Models.Catalog;
@if (Model.Count > 0)
{
    <div class="product-grid bestsellers">
        <div class="title mid-content-title">
            <strong>@T("Bestsellers")</strong>
            <span class="pull-right">
                <a class="title-carousel-control" href="#carousel-example-generic" data-slide="prev">
                    <i class="fa fa-angle-left"></i>
                </a>
                <a class="title-carousel-control" href="#carousel-example-generic" data-slide="next">
                    <i class="fa fa-angle-right"></i>
                </a>

            </span>

        </div>



        <div id="carousel-example-generic" class="carousel slide home-page-best-seller" data-ride="carousel">
    <!-- Indicators -->
    

    <!-- Wrapper for slides -->
    <div class="carousel-inner">
        @{
                    var ci = 0;
         } 
        @foreach (var item in Model)
        {
            if(ci==0)
            {
                @:<div class="item active">
                @:<div class="row box-products" >
            }else if(ci%3==0){
                @:<div class="item">
                @:<div class="row box-products" >
            }
                    
            <div class="col-lg-4 col-md-4 col-sm-6 col-md-12">
                <div class="offer offer-default silde-show-offer pull-text-center">
                    @Html.Partial("_ProductBox", item)
                </div>
            </div>
                    

            if(ci%3==2){
                @:</div>
                @:</div>
            }
            ci++;
        }
        @if(ci%3==2){
                @:</div>
                @:</div>
            }
        
    </div>

    <!-- Controls -->
    

</div>

    </div>
    

}





<br/>